home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C & C++ Multimedia Cyber Classroom
/
C and C++ Multimedia Cyber Classroom (Prentice Hall) (1998).iso
/
src
/
fig10_02.jar
/
Ch10
/
Fig10_02
/
Point1.h
< prev
next >
Wrap
C/C++ Source or Header
|
1997-10-28
|
518b
|
21 lines
// Fig. 10.2: point1.h
// Definition of class Point
#ifndef POINT1_H
#define POINT1_H
#include "shape.h"
class Point : public Shape {
public:
Point( int = 0, int = 0 ); // default constructor
void setPoint( int, int );
int getX() const { return x; }
int getY() const { return y; }
virtual void printShapeName() const { cout << "Point: "; }
virtual void print() const;
private:
int x, y; // x and y coordinates of Point
};
#endif